import { Form, Input, Select, Modal, DatePicker } from 'antd';

const Index = ({ title, visible, handleOk, handleCancel, form2 }: any) => {
  return (
    <Modal
      title={title}
      visible={visible}
      onOk={handleOk}
      onCancel={handleCancel}
    >
      <Form
        name="basic"
        labelCol={{ span: 6 }}
        wrapperCol={{ span: 18 }}
        autoComplete="off"
        form={form2}
      >
        <Form.Item
          label="姓名"
          name="name"
          rules={[{ required: true, message: 'Please input your username!' }]}
        >
          <Input />
        </Form.Item>

        <Form.Item
          label="性别"
          name="sex"
          rules={[{ required: true, message: 'Please choose your sex!' }]}
        >
          <Select allowClear>
            <Select.Option value="1">男</Select.Option>
            <Select.Option value="2">女</Select.Option>
          </Select>
        </Form.Item>

        <Form.Item
          label="城市"
          name="city"
          rules={[{ required: true, message: 'Please input your city!' }]}
        >
          <Input />
        </Form.Item>
        <Form.Item
          label="生日"
          name="birthday"
          rules={[{ required: true, message: 'Please input your city!' }]}
        >
          <DatePicker />
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default Index;
